package static_;

public class VisitedStatic {
    public static void main(String[] args) {
        //类名.类变量名
        //说明：类变量是随类的加载而创建，所以即使没有创建对象实例，也可以访问
        System.out.println(A.name);
        A a = new A();
        //通过对象名.类变量名
        System.out.println("a.name=" + a.name);

        //
        System.out.println(C.address);
    }
}
class A {
    //类变量，依然遵守相关访问权限
public static String name = "jack";
//static public String name = "jack";
}

class C {
    public static String address = "北京";
}